-
Notifications
You must be signed in to change notification settings - Fork 364
tensorrt_rtx try on #3679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
tensorrt_rtx try on #3679
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes that do not conform to C++ style guidelines:
diff --git a/home/runner/work/TensorRT/TensorRT/cpp/bin/torchtrtc/main.cpp b/tmp/changes.txt
index 60c76da..63e4448 100644
--- a/home/runner/work/TensorRT/TensorRT/cpp/bin/torchtrtc/main.cpp
+++ b/tmp/changes.txt
@@ -374,7 +374,9 @@ int main(int argc, char** argv) {
// } else {
// torchtrt::logging::log(
// torchtrt::logging::Level::kINFO,
- // "Int8 precision has been enabled but no calibrator provided. This assumes the network has Q/DQ nodes obtained from Quantization aware training. For more details, refer to https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#work-with-qat-networks");
+ // "Int8 precision has been enabled but no calibrator provided. This assumes the network has Q/DQ nodes
+ // obtained from Quantization aware training. For more details, refer to
+ // https://docs.nvidia.com/deeplearning/tensorrt/developer-guide/index.html#work-with-qat-networks");
// }
} else {
std::stringstream ss;
diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/conversionctx/ConversionCtx.cpp b/tmp/changes.txt
index c821698..9fdcac7 100644
--- a/home/runner/work/TensorRT/TensorRT/core/conversion/conversionctx/ConversionCtx.cpp
+++ b/tmp/changes.txt
@@ -59,16 +59,16 @@ ConversionCtx::ConversionCtx(BuilderSettings build_settings)
for (auto p = settings.enabled_precisions.begin(); p != settings.enabled_precisions.end(); ++p) {
switch (*p) {
case nvinfer1::DataType::kHALF:
- // tensorrt_rtx is strong typed, cannot set fp16 by builder config, only do this for tensorrt build
- #ifndef TRT_MAJOR_RTX
+// tensorrt_rtx is strong typed, cannot set fp16 by builder config, only do this for tensorrt build
+#ifndef TRT_MAJOR_RTX
TORCHTRT_CHECK(
builder->platformHasFastFp16(), "Requested inference in FP16 but platform does not support FP16");
cfg->setFlag(nvinfer1::BuilderFlag::kFP16);
break;
- #endif
+#endif
case nvinfer1::DataType::kINT8:
- // tensorrt_rtx is strong typed, cannot set int8 by builder config, only do this for tensorrt build
- #ifndef TRT_MAJOR_RTX
+// tensorrt_rtx is strong typed, cannot set int8 by builder config, only do this for tensorrt build
+#ifndef TRT_MAJOR_RTX
TORCHTRT_CHECK(
builder->platformHasFastInt8(), "Requested inference in INT8 but platform does not support INT8");
cfg->setFlag(nvinfer1::BuilderFlag::kINT8);
@@ -81,7 +81,7 @@ ConversionCtx::ConversionCtx(BuilderSettings build_settings)
cfg->setInt8Calibrator(settings.calibrator);
}
break;
- #endif
+#endif
case nvinfer1::DataType::kFLOAT:
break;
case nvinfer1::DataType::kINT32:
ERROR: Some files do not conform to style guidelines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/__init__.py 2025-07-11 22:54:04.884045+00:00
+++ /home/runner/work/TensorRT/TensorRT/py/torch_tensorrt/__init__.py 2025-07-11 22:54:29.748057+00:00
@@ -42,12 +42,13 @@
import torch
try:
from . import trt_alias # noqa: F401
-
+
import tensorrt # noqa: F401
+
print(f"You are using {tensorrt.__name__=} {tensorrt.__version__=}")
except ImportError:
tensorrt_version = _parse_semver(__tensorrt_version__)
tensorrt_rtx_version = _parse_semver(__tensorrt_rtx_version__)
--- /home/runner/work/TensorRT/TensorRT/setup.py 2025-07-11 22:54:04.902045+00:00
+++ /home/runner/work/TensorRT/TensorRT/setup.py 2025-07-11 22:54:34.510910+00:00
@@ -548,11 +548,17 @@
tensorrt_linux_external_dir = tensorrt_x86_64_external_dir
if USE_RTX:
tensorrt_windows_external_dir = (
lambda: subprocess.check_output(
- [BAZEL_EXE, "query", "@tensorrt_rtx_win//:nvinfer", "--output", "location"]
+ [
+ BAZEL_EXE,
+ "query",
+ "@tensorrt_rtx_win//:nvinfer",
+ "--output",
+ "location",
+ ]
)
.decode("ascii")
.strip()
.split("/BUILD.bazel")[0]
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/harness.py 2025-07-21 18:44:21.872028+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/harness.py 2025-07-21 18:44:53.079784+00:00
@@ -245,10 +245,11 @@
else:
ref = torch.tensor([ref])
ref = ref.cpu() # to_dtype test has cases with gpu output
# TODO: lanl: remove this once we have a clear plan for strong type support in RTX
import os
+
if os.environ.get("FORCE_TENSORRT_RTX", "0") == "1":
check_dtype = False
torch.testing.assert_close(
out.cpu(),
ref,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are some changes that do not conform to Python style guidelines:
--- /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/harness.py 2025-07-21 21:58:28.723153+00:00
+++ /home/runner/work/TensorRT/TensorRT/tests/py/dynamo/conversion/harness.py 2025-07-21 21:58:57.198142+00:00
@@ -245,10 +245,11 @@
else:
ref = torch.tensor([ref])
ref = ref.cpu() # to_dtype test has cases with gpu output
# TODO: lanl: remove this once we have a clear plan for strong type support in RTX
import os
+
if os.environ.get("FORCE_TENSORRT_RTX", "0") == "1":
check_dtype = False
torch.testing.assert_close(
out.cpu(),
ref,
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant and/or add your own.
Checklist: